package com.cskaoyan.bean;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author Kongwo
 * @description
 * @since 2022/05/06 17:21
 */

@Data
@NoArgsConstructor
public class CommentData {
    private Integer total;
    private Integer pages;
    private Integer limit;
    private Integer page;
    private List<MarketComment> list;

    public static CommentData data(long total, Integer pages, Integer limit, Integer page, List list) {
        CommentData commentData = new CommentData();
        commentData.setTotal((int) total);
        commentData.setPages(pages);
        commentData.setPage(page);
        commentData.setLimit(limit);
        commentData.setList(list);
        return commentData;
    }
}
